#pragma once

#include <iostream>
#include <string>
#include <functional>
#include <vector>

using task_t = std::function<void ()>;

// 四种任务
void DownLoad()
{
    std::cout << "我是一个下载任务" << std::endl;
}

void Mysql()
{
    std::cout << "我是一个数据库任务" << std::endl;
}

void Sync()
{
    std::cout << "我是一个数据同步刷新任务" << std::endl;
}

void Log()
{
    std::cout << "我是一个日志任务" << std::endl;
}

std::vector<task_t> tasks;
class Init
{
public:
    Init()
    {
        tasks.push_back(DownLoad);
        tasks.push_back(Mysql);
        tasks.push_back(Sync);
        tasks.push_back(Log);
    }
};

Init ginit;

